package com.jibei.mendo.bean;

import android.os.Parcel;
import android.os.Parcelable;

import org.greenrobot.greendao.annotation.Entity;
import org.greenrobot.greendao.annotation.Generated;
import org.greenrobot.greendao.annotation.Id;

/**
 * Created by lhl on 2019/9/1.
 */
@Entity
public class ConfigInfoBean implements Parcelable {

    @Id(autoincrement = true)
    private Long id;
    private String vid;//从机id 01  02 ...
    private String configInfo;//从机的配置信息
    private String checkInfo;//自检信息

    @Generated(hash = 1893363769)
    public ConfigInfoBean(Long id, String vid, String configInfo,
                          String checkInfo) {
        this.id = id;
        this.vid = vid;
        this.configInfo = configInfo;
        this.checkInfo = checkInfo;
    }

    @Generated(hash = 1130778933)
    public ConfigInfoBean() {
    }

    public Long getId() {
        return this.id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getVid() {
        return this.vid;
    }

    public void setVid(String vid) {
        this.vid = vid;
    }

    public String getConfigInfo() {
        return this.configInfo;
    }

    public void setConfigInfo(String configInfo) {
        this.configInfo = configInfo;
    }

    public String getCheckInfo() {
        return this.checkInfo;
    }

    public void setCheckInfo(String checkInfo) {
        this.checkInfo = checkInfo;
    }


    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeValue(this.id);
        dest.writeString(this.vid);
        dest.writeString(this.configInfo);
        dest.writeString(this.checkInfo);
    }

    protected ConfigInfoBean(Parcel in) {
        this.id = (Long) in.readValue(Long.class.getClassLoader());
        this.vid = in.readString();
        this.configInfo = in.readString();
        this.checkInfo = in.readString();
    }

    public static final Creator<ConfigInfoBean> CREATOR = new Creator<ConfigInfoBean>() {
        @Override
        public ConfigInfoBean createFromParcel(Parcel source) {
            return new ConfigInfoBean(source);
        }

        @Override
        public ConfigInfoBean[] newArray(int size) {
            return new ConfigInfoBean[size];
        }
    };

    @Override
    public String toString() {
        return "ConfigInfoBean{" +
                "id=" + id +
                ", vid='" + vid + '\'' +
                ", configInfo='" + configInfo + '\'' +
                ", checkInfo='" + checkInfo + '\'' +
                '}';
    }
}
